import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
// 导入路由admin.js
import admin from './admin'
Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Home',
    component: Home,
    redirect: "/admin/login"
  },
  ...admin, // 扩张运算符导入模块
]

const router = new VueRouter({
  routes
})

export default router